package com.share.zabbix.response;

import com.alibaba.fastjson.JSON;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class ZabbixResponseEventAck implements Serializable {

	private static final long serialVersionUID = 1L;

	private String eventid;
   
    private String acknowledgeid;
    private String surname;
    private String name;
    private String alias;
    private String message;
    private String clock;
    private String time;
  
    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
    
    public String getTime() {
        return DateUtil.format(new Date(Long.parseLong(clock) * 1000), "yyyy-MM-dd HH:mm:ss");
    }
}
